package com.util;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts.action.ActionForm;

import com.config.CONFIG;
import com.util.Pagination;

/**
 * @author luanzhe
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PageableActionForm extends ActionForm{	
	public String getId1() {
		return id1;
	}
	public void setId1(String id1) {
		this.id1 = id1;
	}
	public PageableActionForm(){
		super();
	}
	private String operationType = "";  	
	private List list = null;   			/** 列表集合 */
	private String pagParam = "";   		/** 页码参数 */	
	private Pagination pagination = null;	/** 分页显示 */
	private int totalPage = 1;			    /** 总页数*/
	private int totalData = 0;				/** 总记录数*/
	private int currentPage = 1;			/** 当前页*/
	private String  errorFlag       ="";    /**页面错误信息标识*/
	private String yearflag ="";            /**页面是否获取当前年份标识*/ 
	private List yearList = null;           /**页面显示年份列表*/
	private String language="";				/**取得本地语言环境*/
	
	/**@阿塔其迷你ERP项目公用标量--------------------------------begin*/
	private String id ="";            					/**标识*/ 
	private String id1 ="";            					/**标识1*/ 
	private List list_c_customer_type = null;           /**客户类别*/
	private List list_c_area_group = null;           	/**地区分类*/
	private List list_c_payment_terms = null;           /**付款方式*/
	private List list_c_saleman = null;           		/**销售员*/
	private List list_pc_material_family = null;        /**材料家族表*/
	private List list_t_materials = null;           	/**材料列表*/
	private List list_t_measure_units = null;           /**计量单位表*/
	private List list_t_product_type = null;           	/**产品类别*/
	private List list_state_type = null;				/**订单状态*/
	private List list_stock_reason_type = null;			/**库存原因*/
	private List list_t_tablename = null;			    /**码表管理*/

	private String list_c_customer_type_code ="";       /**客户类别代码*/ 
	private String list_c_customer_type_name ="";       /**客户类别名称*/ 
	private String list_c_area_group_code ="";          /**地区分类代码*/ 
	private String list_c_area_group_name ="";          /**地区分类名称*/ 
	private String list_c_payment_terms_code ="";       /**付款方式代码*/ 
	private String list_c_payment_terms_name ="";       /**付款方式名称*/ 
	private String list_c_saleman_code ="";             /**销售员代码*/ 
	private String list_c_saleman_name ="";             /**销售员名称*/ 
	private String list_pc_material_family_code ="";    /**材料家族表代码*/ 
	private String list_pc_material_family_name ="";    /**材料家族表识名称*/ 
	private String list_t_materials_code ="";           /**材料列表代码*/ 
	private String list_t_materials_name ="";           /**材料列表名称*/ 
	private String list_t_measure_units_code ="";       /**计量单位表代码*/ 
	private String list_t_measure_units_name ="";       /**计量单位表名称*/ 
	private String list_t_product_type_code ="";        /**产品类别代码*/ 
	private String list_t_product_type_name ="";        /**产品类别名称*/
	private String list_state_type_code = "";			/**订单状态代码*/
	private String list_state_name = "";				/**订单状态名称*/
	private String list_t_tablename_code = "";			/**码表CODE*/
	private String list_t_tablename_name = "";			/**码表NAME*/
	/**@阿塔其迷你ERP项目公用标量------------------------------------end*/
	/**
	 * @return Returns the currentPage.
	 */
	public int getCurrentPage() {
		return currentPage;
	}
	/**
	 * @param currentPage The currentPage to set.
	 */
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	/**
	 * @return Returns the list.
	 */
	public List getList() {
		this.list = this.pagination.getPage(currentPage);
		this.setCurrentPage(this.pagination.getCurrentPage());
		return list;
	}
	/**
	 * @param list The list to set.
	 */
	public void setList(List list) {
		if(pagination == null){
			this.pagination = new Pagination();
			this.pagination.setItemCountPerPage(CONFIG.ITEM_COUNT_PER_PAGE);
		}
        this.pagination.setRows((ArrayList)list);
        this.setTotalPage(this.pagination.getPageCount());
        this.setTotalData(this.pagination.getItemCount());
	}
	
	/**
	 * @return Returns the pagParam.
	 */
	public String getPagParam() {
		return pagParam;
	}
	/**
	 * @param pagParam The pagParam to set.
	 */
	public void setPagParam(String pagParam) {
		this.pagParam = pagParam;
	}
	/**
	 * @return Returns the totalData.
	 */
	public int getTotalData() {
		return totalData;
	}
	/**
	 * @param totalData The totalData to set.
	 */
	public void setTotalData(int totalData) {
		this.totalData = totalData;
	}
	/**
	 * @return Returns the totalPage.
	 */
	public int getTotalPage() {
		return totalPage;
	}
	/**
	 * @param totalPage The totalPage to set.
	 */
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	
	/**
	 * @return Returns the operationType.
	 */
	public String getOperationType() {
		return operationType;
	}
	/**
	 * @param operationType The operationType to set.
	 */
	public void setOperationType(String operationType) {
		this.operationType = operationType;
	}
	public String getErrorFlag() {
		return errorFlag;
	}
	public void setErrorFlag(String errorFlag) {
		this.errorFlag = errorFlag;
	}
	public Pagination getPagination() {
		return pagination;
	}
	public void setPagination(Pagination pagination) {
		this.pagination = pagination;
	}
	public String getYearflag() {
		return yearflag;
	}
	public void setYearflag(String yearflag) {
		this.yearflag = yearflag;
	}
	public List getYearList() {
		return yearList;
	}
	public void setYearList(List yearList) {
		this.yearList = yearList;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public List getList_c_customer_type() {
		return list_c_customer_type;
	}
	public void setList_c_customer_type(List list_c_customer_type) {
		this.list_c_customer_type = list_c_customer_type;
	}
	public List getList_t_product_type() {
		return list_t_product_type;
	}
	public void setList_t_product_type(List list_t_product_type) {
		this.list_t_product_type = list_t_product_type;
	}
	public List getList_c_area_group() {
		return list_c_area_group;
	}
	public void setList_c_area_group(List list_c_area_group) {
		this.list_c_area_group = list_c_area_group;
	}
	public String getList_c_area_group_code() {
		return list_c_area_group_code;
	}
	public void setList_c_area_group_code(String list_c_area_group_code) {
		this.list_c_area_group_code = list_c_area_group_code;
	}
	public String getList_c_area_group_name() {
		return list_c_area_group_name;
	}
	public void setList_c_area_group_name(String list_c_area_group_name) {
		this.list_c_area_group_name = list_c_area_group_name;
	}
	public String getList_c_customer_type_code() {
		return list_c_customer_type_code;
	}
	public void setList_c_customer_type_code(String list_c_customer_type_code) {
		this.list_c_customer_type_code = list_c_customer_type_code;
	}
	public String getList_c_customer_type_name() {
		return list_c_customer_type_name;
	}
	public void setList_c_customer_type_name(String list_c_customer_type_name) {
		this.list_c_customer_type_name = list_c_customer_type_name;
	}
	public List getList_c_payment_terms() {
		return list_c_payment_terms;
	}
	public void setList_c_payment_terms(List list_c_payment_terms) {
		this.list_c_payment_terms = list_c_payment_terms;
	}
	public String getList_c_payment_terms_code() {
		return list_c_payment_terms_code;
	}
	public void setList_c_payment_terms_code(String list_c_payment_terms_code) {
		this.list_c_payment_terms_code = list_c_payment_terms_code;
	}
	public String getList_c_payment_terms_name() {
		return list_c_payment_terms_name;
	}
	public void setList_c_payment_terms_name(String list_c_payment_terms_name) {
		this.list_c_payment_terms_name = list_c_payment_terms_name;
	}
	public List getList_c_saleman() {
		return list_c_saleman;
	}
	public void setList_c_saleman(List list_c_saleman) {
		this.list_c_saleman = list_c_saleman;
	}
	public String getList_c_saleman_code() {
		return list_c_saleman_code;
	}
	public void setList_c_saleman_code(String list_c_saleman_code) {
		this.list_c_saleman_code = list_c_saleman_code;
	}
	public String getList_c_saleman_name() {
		return list_c_saleman_name;
	}
	public void setList_c_saleman_name(String list_c_saleman_name) {
		this.list_c_saleman_name = list_c_saleman_name;
	}
	public List getList_pc_material_family() {
		return list_pc_material_family;
	}
	public void setList_pc_material_family(List list_pc_material_family) {
		this.list_pc_material_family = list_pc_material_family;
	}
	public String getList_pc_material_family_code() {
		return list_pc_material_family_code;
	}
	public void setList_pc_material_family_code(String list_pc_material_family_code) {
		this.list_pc_material_family_code = list_pc_material_family_code;
	}
	public String getList_pc_material_family_name() {
		return list_pc_material_family_name;
	}
	public void setList_pc_material_family_name(String list_pc_material_family_name) {
		this.list_pc_material_family_name = list_pc_material_family_name;
	}
	public List getList_t_materials() {
		return list_t_materials;
	}
	public void setList_t_materials(List list_t_materials) {
		this.list_t_materials = list_t_materials;
	}
	public String getList_t_materials_code() {
		return list_t_materials_code;
	}
	public void setList_t_materials_code(String list_t_materials_code) {
		this.list_t_materials_code = list_t_materials_code;
	}
	public String getList_t_materials_name() {
		return list_t_materials_name;
	}
	public void setList_t_materials_name(String list_t_materials_name) {
		this.list_t_materials_name = list_t_materials_name;
	}
	public List getList_t_measure_units() {
		return list_t_measure_units;
	}
	public void setList_t_measure_units(List list_t_measure_units) {
		this.list_t_measure_units = list_t_measure_units;
	}
	public String getList_t_measure_units_code() {
		return list_t_measure_units_code;
	}
	public void setList_t_measure_units_code(String list_t_measure_units_code) {
		this.list_t_measure_units_code = list_t_measure_units_code;
	}
	public String getList_t_measure_units_name() {
		return list_t_measure_units_name;
	}
	public void setList_t_measure_units_name(String list_t_measure_units_name) {
		this.list_t_measure_units_name = list_t_measure_units_name;
	}
	public String getList_t_product_type_code() {
		return list_t_product_type_code;
	}
	public void setList_t_product_type_code(String list_t_product_type_code) {
		this.list_t_product_type_code = list_t_product_type_code;
	}
	public String getList_t_product_type_name() {
		return list_t_product_type_name;
	}
	public void setList_t_product_type_name(String list_t_product_type_name) {
		this.list_t_product_type_name = list_t_product_type_name;
	}
	public String getList_state_name() {
		return list_state_name;
	}
	public void setList_state_name(String list_state_name) {
		this.list_state_name = list_state_name;
	}
	public List getList_state_type() {
		return list_state_type;
	}
	public void setList_state_type(List list_state_type) {
		this.list_state_type = list_state_type;
	}
	public String getList_state_type_code() {
		return list_state_type_code;
	}
	public void setList_state_type_code(String list_state_type_code) {
		this.list_state_type_code = list_state_type_code;
	}
	public List getList_stock_reason_type() {
		return list_stock_reason_type;
	}
	public void setList_stock_reason_type(List list_stock_reason_type) {
		this.list_stock_reason_type = list_stock_reason_type;
	}
	public List getList_t_tablename() {
		return list_t_tablename;
	}
	public void setList_t_tablename(List list_t_tablename) {
		this.list_t_tablename = list_t_tablename;
	}
	public String getList_t_tablename_code() {
		return list_t_tablename_code;
	}
	public void setList_t_tablename_code(String list_t_tablename_code) {
		this.list_t_tablename_code = list_t_tablename_code;
	}
	public String getList_t_tablename_name() {
		return list_t_tablename_name;
	}
	public void setList_t_tablename_name(String list_t_tablename_name) {
		this.list_t_tablename_name = list_t_tablename_name;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}

	
}
